namespace Persistent.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;

    internal sealed class Configuration : DbMigrationsConfiguration<Persistent.PersistentContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
        }

        protected override void Seed(Persistent.PersistentContext context)
        {
            //  This method will be called after migrating to the latest version.

            context.Players.AddOrUpdate(p =>
                new { p.Name, p.Age },
                new Domain.Player { Name = "qwe", Age = 22 },
                new Domain.Player { Name = "ikj", Age = 22 },
                new Domain.Player { Name = "olo", Age = 22 },
                new Domain.Player { Name = "rty", Age = 22 },
                new Domain.Player { Name = "iop", Age = 22 },
                new Domain.Player { Name = "asd", Age = 22 },
                new Domain.Player { Name = "fgh", Age = 22 },
                new Domain.Player { Name = "jkl", Age = 22 },
                new Domain.Player { Name = "mnb", Age = 22 },
                new Domain.Player { Name = "bvc", Age = 22 },
                new Domain.Player { Name = "fvc", Age = 22 },
                new Domain.Player { Name = "drt", Age = 22 },
                new Domain.Player { Name = "rtg", Age = 22 },
                new Domain.Player { Name = "hyu", Age = 22 },
                new Domain.Player { Name = "ujm", Age = 22 },
                new Domain.Player { Name = "tgb", Age = 22 });
        }
    }
}
